package com.chhlz.module.base.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/***
 * 菜式类型实体
 * @author ALEXGORDON
 *
 */
@Entity
@Table(name="DISH_CATEGORY")
@DynamicInsert(true)
@DynamicUpdate(true)
public class DishCategory{
	private int dcId;
	private String dcName;
	private String description;
	
	@Override
	public String toString() {
		return "DishCategory [dcId=" + dcId + ", dcName=" + dcName
				+ ", description=" + description + "]";
	}
	@Id
	@Column(name = "dc_id",  nullable = false, length = 11)
	@GeneratedValue(generator = "generator") 
	@GenericGenerator(name = "generator", strategy = "increment") 	
	public int getDcId() {
		return dcId;
	}
	public void setDcId(int dcId) {
		this.dcId = dcId;
	}
	@Column(name="dc_name",nullable=false,length=20)
	public String getDcName() {
		return dcName;
	}
	public void setDcName(String dcName) {
		this.dcName = dcName;
	}
	@Column(name="description",length=255)
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	
}
